﻿Imports System
Imports System.Text
Imports System.Workflow.ComponentModel.Design

Namespace System.Workflow.ComponentModel
    Friend Class InternalHelpers
        ' Methods
        Friend Shared Function GenerateQualifiedNameForLockedActivity(ByVal activity As Activity, ByVal id As String) As String
            Dim builder As New StringBuilder
            Dim str As String = If(String.IsNullOrEmpty(id), activity.Name, id)
            Dim declaringActivity As CompositeActivity = Helpers.GetDeclaringActivity(activity)
            If (Not declaringActivity Is Nothing) Then
                builder.Append(declaringActivity.QualifiedName).Append(".").Append(str)
            Else
                builder.Append(str)
            End If
            Return builder.ToString
        End Function

    End Class
End Namespace

